"""
URL configuration for xiaoyu_mall project.

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/5.2/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""

from django.contrib import admin
from django.urls import path,include

from xiaoyu_mall.apps.users import views
app_name = 'users'
urlpatterns = [
    # 注册
    path('register/', views.RegisterView.as_view(), name='register'),
    path("checkusername/<username>/",views.check_username,name='checkusername'),
    path("checkphone/<phone>/",views.check_phone,name='checkphone'),
    # 登录
    path("login/",views.LoginView.as_view(),name='login'),
    # 退出登录
    path("logout/",views.LogoutView.as_view(),name='logout'),
    # 用户中心
    path("info/",views.UserInfoView.as_view(), name='info'),
    # 订单
    path('orders/info/<int:page_num>/', views.UserOrderInfoView.as_view(),name='myorderinfo'),

    path("cookie/",views.use_cookie,name='cookie'),
    path("getcookie/",views.get_cookie,name='getcookie'),
]
